cmake_minimum_required(VERSION 2.8.0)

project(Pluma)

set(CMAKE_BUILD_RPATH ${CMAKE_CURRENT_SOURCE_DIR}/build)
message(${CMAKE_BUILD_RPATH})

add_definitions(
    -DPLUMA_EXPORTS
)

set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BUILD_RPATH}/lib_Debug)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BUILD_RPATH}/lib_Release)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BUILD_RPATH}/lib_MinSizeRel)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BUILD_RPATH}/lib_RelInfoDebug)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BUILD_RPATH}/bin_Debug)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BUILD_RPATH}/bin_Release)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BUILD_RPATH}/bin_MinSizeRel)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BUILD_RPATH}/bin_RelInfoDebug)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BUILD_RPATH}/lib_Debug)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BUILD_RPATH}/lib_Release)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BUILD_RPATH}/lib_MinSizeRel)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BUILD_RPATH}/lib_RelInfoDebug)

set(SOURCE_HEAD ${CMAKE_CURRENT_SOURCE_DIR}/include)
set(SOURCE_CPP ${CMAKE_CURRENT_SOURCE_DIR}/src)

include_directories(
    ${SOURCE_HEAD}
    ${SOURCE_HEAD}/Pluma
    ${SOURCE_CPP}
    ${SOURCE_CPP}/Pluma
    )

aux_source_directory(${SOURCE_CPP}/Pluma ALL_SRC)

add_library(Pluma STATIC ${ALL_SRC})

subdirs(${CMAKE_CURRENT_SOURCE_DIR}/example)
